<template>
  <div class="content-container">
    <img class="system-logo-icon" src="@/assets/logo.png"></img>
    <div class="tab-content">
      <div class="panel" >
        <div class="list-item" @click="$router.push({path:'/law-detail',query:{flfgbt:item.flfgbt,wjdz00:item.wjdz00}})" :key="index" v-for="(item,index) in lawData">
          <div class="title">{{item.flfgbt}}</div>
          <div class="time">{{item.gbsj00.substring(0,10)}}</div>
        </div>
        <empty-data-panel v-if="lawData.length==0"></empty-data-panel>
      </div>
    </div>
  </div>
</template>
<script>
import ReturnBtn from "@/views/components/ReturnBtn.vue";
import {laborRightsApi} from "@/api";

export default {
  name:"law-list",
  components:{
    ReturnBtn
  },
  data(){
    return {
      policyType:{},
      queryPolicyParam:{
        page:1,
        limit:10
      },
      queryNewsParam:{
        page:1,
        limit:10
      },
      lawData:[
      ]
    }
  },
  mounted() {
    this.queryLaw()
  },
  methods: {
    queryLaw(){
      laborRightsApi.queryLaw({zclx00:this.policyType.value,page:this.queryPolicyParam.page,limit: this.queryPolicyParam.limit}).then((res) => {
        this.lawData = res.data.records
      }).catch(()=>{

      })
    }

  }
}
</script>
<style lang="scss" scoped>
.tabs{

  color: white;
  display: flex;
  height: 80px;
  .tab{
    border-radius: 10px;
    background-color: #52489C;
    cursor: pointer;
    margin-top: 5px;
    width: 85%;
    height: 100%;
    line-height: 80px;
    font-size: xxx-large;
    margin-left: auto;
    margin-right: auto;
  }



}
.tab-content{
  margin-top: 20px;
  padding-bottom: 20px;
  .panel{
    border-radius: 10px;
    background-color: rgba(82, 72, 156,0.2);
    width: 70%;
    margin-left: auto;
    margin-right: auto;
    .list-item{
      border-bottom: 1px solid #409eff ;
      cursor: pointer;
      display: flex;
      font-size: 24px;
      color: white;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .title{
        padding: 15px 0px 15px 40px;
        flex: 1;
        text-align: left;
      }
      .time{
        width: 200px;
        margin-right: 20px;
        text-align: right;
      }
    }


  }

}
</style>
